
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>添加模板</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
 <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

        .note-editable {
            height: 150px
        }

    </style>

</head>

<body class="white-bg" style="padding: 3px;">
    <div class="page-heade">
       <h2 class="title_color text-center">申请请假</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei text-center">
            <tr>
                <td style="width: 140px;">编号</td>
                <td class="text-left" colspan="5"></td>
            </tr>
            <tr>
                <td>申请人姓名</td>
                <td class="text-left">蔡启豪</td>
                <td style="width: 140px;">申请人部门</td>
                <td class="text-left">华中大区</td>
                <td style="width: 140px;">申请人职务</td>
                <td class="text-left">华中大区销售代表</td>
            </tr>
            <tr>
                <td>实际请假人</td>
                <td colspan="5" class="text-left">
                     <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>

                </td>
            </tr>
            <tr>
                <td>状态</td>
                <td class="text-left">草稿</td>
                <td>申请时间</td>
                <td colspan="3" class="text-left">2017-12-19 01:38</td>
            </tr>
            <tr>
                <td>主题 <span class="colorRed">*</span></td>
                <td colspan="5" class="text-left"><input type="text" name="" class="form-control"></td>
            </tr>
            <tr>
                <td>上级审批人 <span class="colorRed">*</span></td>
                <td colspan="5" class="text-left">选择的角色为最终上级审批人，不需要再选择上级审批人员。</td>
            </tr>
            <tr>
                <td>请假时间 <span class="colorRed">*</span></td>
                <td colspan="2" class="text-left">
                      <div class="form-group ">
                <label for="search6">时间</label>
                 <div class="form-group">
            <input type="text" id="start" class="form-control layer-date " style="min-width:120px;width:120px;display: inline-block;" name="" value="2017-12-19 01:38">
           </div>
            <div class="form-group">
                至
            </div>
           <div class="form-group">
            <input type="text" class="form-control layer-date"  style="min-width:120px;width:120px;display: inline-block;" id="end" name="" value="2017-12-19 01:38">
           </div>
            </div>

                </td>
                <td colspan="3" class="text-left">
                    共 <input type="text" name="" class="form-control" style="width: 70px">天
                    <select class="form-control select" style="width: 70px">
                      <option value="0">0</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>    
                    </select> 小时(示例：申请半天假期0天4小时；1天假期1天0小时) 
                </td>
            </tr>
            <tr>
                <td>请假类别</td>
                <td colspan="5" class="text-left">
                    <label class="radio-inline" for="vacate1">
                        <input type="radio" checked name="vacate" class="form-control" id="vacate1">病假
                    </label>
                     <label class="radio-inline" for="vacate2">
                        <input type="radio" name="vacate" class="form-control" id="vacate2">事假
                    </label>
                     <label class="radio-inline" for="vacate3">
                        <input type="radio" name="vacate" class="form-control" id="vacate3">外出办事
                    </label>
                     <label class="radio-inline" for="vacate4">
                        <input type="radio" name="vacate" class="form-control" id="vacate4">补休
                    </label>
                     <label class="radio-inline" for="vacate5">
                        <input type="radio" name="vacate" class="form-control" id="vacate5">婚假
                    </label>
                       <label class="radio-inline" for="vacate6">
                        <input type="radio" name="vacate" class="form-control" id="vacate6">产假
                    </label>
                       <label class="radio-inline" for="vacate7">
                        <input type="radio" name="vacate" class="form-control" id="vacate7">调休
                    </label>
                      <label class="radio-inline" for="vacate8">
                        <input type="radio" name="vacate" class="form-control" id="vacate8">其他
                    </label>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="text-left">
                     <div class="ibox float-e-margins" style="margin-bottom: 0">
                        <div class="ibox-content no-padding">

                            <div class="summernote" id="info">
                                                            </div>

                        </div>
                    </div>
                </td>
            </tr>
            <tr>
             <td colspan="2" class="text-left">温馨提醒：本编辑器不支持复杂表单提交，复杂表单请以附件形式提交</td>
            </tr>
        </table>
        <div class="form-group white-bg" style="margin:20px 10px 20px 20px;">
            <div id="uploader" class="wu-example">
                <!--用来存放文件信息-->
                <div id="thelist" class="uploader-list">
                                   </div>
                <div class="btns">
                    <div id="picker">选择文件</div>
                    <button id="ctlBtn" class="btn btn-default">开始上传</button>
                </div>
                <input type="hidden" name="attach" id="attach"  >
            </div>
            <span>注：最多上传15个文件，每个文件小于50M,支持格式：</span><br>jpg,bnp,gif,png,jpeg,tif,raw,doc,docx,xls,xlsx,ppt,pptx,txt,pdf,rar,zip,mp4,avi,rmvb,rm,mid,3gp,AVI,3GP,,mpg,mp3,wma,wav
        </div>

        <div class="padding-10 text-center"><button class="btn btn-primary" type="submit">保存为草稿</button><span class="lr_5"></span><button class="btn btn-success" type="button">保存并提交工作流</button><span class="lr_5"></span><button class="btn btn-warning" type="button" id="fanhui">返回</button></div>
    </form>
  
    
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
          $('#fanhui').on('click',function () {
//                    parent.layer.close(parent.layer.getFrameIndex(window.name))
                    parent.location.reload();
                    return false
                })
    })
</script>
   <script src="__STATIC__/layout/js/plugins/summernote/summernote.min.js"></script>
<script src="__STATIC__/layout/js/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);

    $(document).ready(function () {
        $('.summernote').summernote({
            lang: 'zh-CN'
        });
    });

  
  var jieshou = $("#area_id");
 sousuo(jieshou);
       function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: false, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }

</script>
</body>

</html>